<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"> 

<ui:composition template="/_documento.xhtml">
	<ui:define name="corpo">

		<div id="conteudo">
			<h:form>

				<h2>
					<h:outputText value="Novo Tipo de Documento"
						rendered="#{empty tipoDocumentoBean.tipo.id}" />
					<h:outputText value="Editar Orgão"
						rendered="#{not empty tipoDocumentoBean.tipo.id}" />
				</h2>
				
				<p:messages id="msg"/>
				<p:growl id="grow" showDetail="true" sticky="true">

				<p:fieldset legend="Tipo de Documento" toggleable="true" style="background-image: url(resources/imagens/72.jpg);"><br />
						
					<h:outputLabel value="Nome: " for="nome" />
					<p:inputText id="nome" value="#{tipoDocumentoBean.tipo.nome}" style="width: 250px;" required="true" requiredMessage="Preencha o Nome do Tipo de Documento">
						<f:ajax event="change" />
					</p:inputText><br />

					<br />
					<p:commandButton value="Cadastrar" action="#{tipoDocumentoBean.grava}" ajax="false" image="ui-icon-disk" update="msg">
						<f:ajax render="form" />
					</p:commandButton>

				</p:fieldset>
				</p:growl>
				
			</h:form>
		</div>

	</ui:define>
</ui:composition>

</html>
